package binary;

import java.util.ArrayList;

public class Demo12 {
    public static void main(String[] args) {
        int n = -40;
        System.out.println(Integer.toBinaryString(n));
        System.out.println(Integer.toBinaryString(n>>1));
        System.out.println(n>>1);
        System.out.println(Integer.toBinaryString(n>>2));
        System.out.println(n>>2);
        System.out.println(Integer.toBinaryString(n>>3));
        System.out.println(n>>3);
        System.out.println(Integer.toBinaryString(n>>4));
        System.out.println(n>>4);
        System.out.println(Integer.toBinaryString(n>>5));
        System.out.println(n>>5);
        System.out.println(Integer.toBinaryString(n>>>1));
        System.out.println(n>>>1);
        //ArrayList 扩容1.5倍
        //StringBuilder 扩容 1倍+2
    }
}
